import request from '@/utils/request'

// 获取用户分页
export function getUserPageList(data,page,size) {
    return request({
        url: `/system/sysUserController/getUserPageList?page=${page}&size=${size}`,
        method: 'post',
        data: data
    })
}

// 获取用户详情
export function getUserDetail(id) {
    return request({
        url: `/system/sysUserController/getUserDetail?id=${id}`,
        method: 'get'
    })
}

// 新增用户
export function addUser(data) {
    return request({
        url: '/system/sysUserController/addUser',
        method: 'post',
        data: data
    })
}

// 编辑用户
export function updateUser(data) {
    return request({
        url: '/system/sysUserController/updateUser',
        method: 'put',
        data: data
    })
}

// 删除用户
export function deleteUser(id) {
    return request({
        url: `/system/sysUserController/deleteUser?id=${id}`,
        method: 'delete'
    })
}
